<%--
  Created by IntelliJ IDEA.
  User: LikZ
  Date: 2021.8.31
  Time: 上午 8:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>管理员登陆界面</title>
    <link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet" />
    <script src="${pageContext.request.contextPath}/js/jquery-1.11.3.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
    <style>
        #big{
            width: 800px;
            height:auto;
            margin: 150px 0 0 350px;
            border: 3px solid lightsteelblue;
            border-radius: 12px;
        }
    </style>
</head>
<body background="${pageContext.request.contextPath}/img/login_bg1.jpg" >
<div id="big">
    <form action="${pageContext.request.contextPath}/adminlogin" method="post">
        <div>
            <p style="text-align: center; color:black; font-size: 40px;">Rice Mall·管理员后台管理系统</p>
        </div>
        <div class="form-group">
            <label for="adminname" style="color: black">管理员用户名</label>
            <input type="text" class="form-control"  name="adminname" id="adminname"
                   placeholder="请输入管理员用户名" value="${cookie.username.value}" style="border-radius: 12px">
        </div>
        <div class="form-group">
        <label for="adminpassword" style="color: black">密码</label>
        <input type="password" class="form-control" name="adminpassword" id="adminpassword"
               placeholder="请输入用户密码" style="border-radius: 12px">
    </div>
        <div class="form-group">
            <label for="code" style="color:black">验证码</label>
            <input type="text" name="code" id="code"  placeholder="请输入验证码" />
            <img id="img1"  src="${pageContext.request.contextPath}/checkCodeServlet"  />
            <div>
                <span style="color:black;margin-left: 100px;font-size: 30px">${msg}</span>
            </div>
        </div>
        <div class="checkbox">
            <label>
                <input type="checkbox"><p style="color: black">记住我</p>
            </label>
        </div>
        <input type="submit" class="btn btn-success" value="登录" style="margin-left: 300px" />
        <a href="${pageContext.request.contextPath}/index" class="btn btn-danger">首页</a>
    </form>
</div>
</body>
<script>
    $(function () {
        $("#img1").click(function () {
            this.src="${pageContext.request.contextPath}/checkCodeServlet?time="+new Date().getTime();
        })
    })
</script>
</html>
